//
//  DiyCell.m
//  FMDB-名片
//
//  Created by Hello Cai on 16/2/18.
//  Copyright © 2016年 Hello Cai. All rights reserved.
//

#import "DiyCell.h"

@interface DiyCell ()

//联系人列表中国年的头像
@property (weak, nonatomic) IBOutlet UIImageView *imageV;
//名字
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *phoneLabel;

@end

@implementation DiyCell

//把对象模型中的值传递给DiyCell的ImageView和两个Label
-(void)setPersonModel:(Person *)personModel{
    _personModel = personModel;
    
    //刷新ui
    self.nameLabel.text = personModel.nameStr;
    self.phoneLabel.text = personModel.phoneStr;
    self.imageV.image = [UIImage imageWithData:personModel.imageData];
}

@end
